home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Misc / RZToDoList / Source / ToDoItemPublic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  1.5 KB  |  61 lines

  1. /* 
  2.  * ToDoItemPublic - public implementation of ToDoItem, does not contain
  3.  *        priority calculation code
  4.  *
  5.  * You may freely copy, distribute and reuse the code in this example.
  6.  * This code is provided AS IS without warranty of any kind, expressed 
  7.  * or implied, as to its fitness for any particular use.
  8.  *
  9.  * Copyright 1995 Ralph Zazula (rzazula@next.com).  All Rights Reserved.
  10.  *
  11.  */
  12.  
  13. #import <objc/Object.h>
  14. #import "ToDoItems.h"
  15.  
  16. #define TODO_TYPE_NORMAL 0x0
  17. #define TODO_TYPE_APPOINTMENT 0x1
  18. #define TODO_TYPE_LOWPRIORITY 0x2
  19. #define TODO_TYPE_HIGHPRIORITY 0x3
  20.  
  21. @interface ToDoItemPublic : Object <ToDoItems>
  22. {
  23.     char *subject;
  24.     long startDate, dueDate, dateCompleted;
  25.     char *data;
  26.     int dataLen;
  27.     struct _toDoItemFlags {
  28.     #ifdef __BIG_ENDIAN__
  29.         unsigned int type:8;
  30.         unsigned int private:1;
  31.         unsigned int completed:1;
  32.         unsigned int _RESERVED:22;
  33.     #else
  34.         unsigned int _RESERVED:22;
  35.         unsigned int completed:1;
  36.         unsigned int private:1;
  37.         unsigned int type:8;
  38.     #endif
  39.     } _flags;
  40. }
  41.  
  42. - initSubject:(char *)subj startDate:(long)start dueDate:(long)due
  43.     completeDate:(long)completed type:(char)type isPrivate:(BOOL)privateFlag
  44.     isCompleted:(BOOL)completeFlag data:(char *)buf dataLen:(int)len;
  45.     
  46. - initFromItem:(id <ToDoItems>)anItem;
  47.  
  48. - (char *)subject;
  49. - (long)startDate;
  50. - (long)dueDate;
  51. - (long)dateCompleted;
  52. - (char)type;
  53. - (BOOL)isPrivate;
  54. - (BOOL)isCompleted;
  55. - (const char *)asciiStartDate;
  56. - (const char *)asciiCompletedDate;
  57. - (const char *)asciiDueDate;
  58. - getData:(char **)d length:(int *)len;
  59.  
  60. @end
  61.